import com.aliyuncs.DefaultAcsClient;
import com.aliyuncs.IAcsClient;
import com.aliyuncs.dysmsapi.model.v20170525.SendSmsRequest;
import com.aliyuncs.dysmsapi.model.v20170525.SendSmsResponse;
import com.aliyuncs.exceptions.ClientException;
import com.aliyuncs.exceptions.ServerException;
import com.aliyuncs.profile.DefaultProfile;
import com.google.gson.Gson;
import org.junit.jupiter.api.Test;

public class test {

        @Test
        public void test1() {
//            DefaultProfile profile = DefaultProfile.getProfile("cn-hangzhou", "LTAI5t8BPgoGE3tfvePuyixk", "5sPfV8wTOlhbEs7U01ofYcV8tfloEM");
//            IAcsClient client = new DefaultAcsClient(profile);
//
//            SendSmsRequest request = new SendSmsRequest();
//            request.setSignName("阿里云短信测试");
//            request.setTemplateCode("SMS_154950909");
//            request.setPhoneNumbers("13356906307");
//            request.setTemplateParam("{\"code\":\"1234\"}");
//
//            try {
//                SendSmsResponse response = client.getAcsResponse(request);
//                System.out.println(new Gson().toJson(response));
//            } catch (ServerException e) {
//                e.printStackTrace();
//            } catch (ClientException e) {
//                System.out.println("ErrCode:" + e.getErrCode());
//                System.out.println("ErrMsg:" + e.getErrMsg());
//                System.out.println("RequestId:" + e.getRequestId());
//            }
        }

}
